import { NodeTypeMap, NodeIconMap, nodeConfig } from './static'
// 获取base64图片前缀
export const getBase64Url = (base64STr: string) => {
  return `data:image/png;base64,${base64STr}`
}
// 获取映射内容
export const getTarget = (Index: any, Target: any) => {
  if (Target === 'nodetype') {
    return NodeTypeMap[Index as keyof typeof NodeTypeMap]
  }
  if (Target === 'icon') {
    return NodeIconMap[Index as keyof typeof NodeIconMap]
  }
}
// 创建节点函数
export const createNode = (data: any) => {
  return {
    ...nodeConfig,
    ...data
  }
}
export const FINDNode = (currentNode: any, NODES: any, LINKS: any, KEY: string) => {}